import {goodsApi} from '../../api/modules/goods.js'
import  fs from 'fs'
export default {
	namespaced:true,
	state:{
		goodList:[],
		count:10
	},
	mutations:{
		getGoodList(state,res){
		 state.goodList = res.data.message
		 console.log('res11',res);
		 state.count = res.statusCode
		 console.log(state);
		},
	},
	actions:{
		async handleGoodList({commit}){
		let res =	await goodsApi()
		// console.log('res',res);
		await commit('getGoodList',res)
		// state.goodList = JSON.parse(JSON.stringify(res.data))
		
	}
	}
}